home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 104 / MacAddict_104_2005-04.iso / Software / Internet & Communication / WordPress 1.2.2 freeware.dmg / wordpress / wp-admin / options-discussion.php < prev    next >
Encoding:
PHP Script  |  2004-05-08  |  4.8 KB  |  115 lines

  1. <?php
  2. require_once('../wp-includes/wp-l10n.php');
  3.  
  4. $title = 'Discussion Options';
  5. $parent_file = 'options-general.php';
  6.  
  7. function add_magic_quotes($array) {
  8.     foreach ($array as $k => $v) {
  9.         if (is_array($v)) {
  10.             $array[$k] = add_magic_quotes($v);
  11.         } else {
  12.             $array[$k] = addslashes($v);
  13.         }
  14.     }
  15.     return $array;
  16. }
  17.  
  18. if (!get_magic_quotes_gpc()) {
  19.     $_GET    = add_magic_quotes($_GET);
  20.     $_POST   = add_magic_quotes($_POST);
  21.     $_COOKIE = add_magic_quotes($_COOKIE);
  22. }
  23.  
  24. $wpvarstoreset = array('action','standalone', 'option_group_id');
  25. for ($i=0; $i<count($wpvarstoreset); $i += 1) {
  26.     $wpvar = $wpvarstoreset[$i];
  27.     if (!isset($$wpvar)) {
  28.         if (empty($_POST["$wpvar"])) {
  29.             if (empty($_GET["$wpvar"])) {
  30.                 $$wpvar = '';
  31.             } else {
  32.                 $$wpvar = $_GET["$wpvar"];
  33.             }
  34.         } else {
  35.             $$wpvar = $_POST["$wpvar"];
  36.         }
  37.     }
  38. }
  39.  
  40. $standalone = 0;
  41. include_once('admin-header.php');
  42. include('options-head.php');
  43. ?>
  44.  
  45. <div class="wrap"> 
  46.     <h2><?php _e('Discussion Options') ?></h2> 
  47.     <form name="form1" method="post" action="options.php"> 
  48.         <input type="hidden" name="action" value="update" /> 
  49.         <input type="hidden" name="page_options" value="'default_pingback_flag','default_ping_status','default_comment_status','comments_notify','moderation_notify','comment_moderation','require_name_email','comment_max_links','moderation_keys'" /> 
  50. <fieldset class="options">
  51.         <legend><?php _e('Usual settings for an article: <em>(These settings may be overridden for individual articles.)</em>') ?></legend> 
  52.         <ul> 
  53.             <li> 
  54.                 <label for="default_pingback_flag"> 
  55.                 <input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_settings('default_pingback_flag')); ?> /> 
  56.             <?php _e('Attempt to notify any Weblogs linked to from the article (slows down posting.)') ?></label> 
  57.             </li> 
  58.             <li> 
  59.                 <label for="default_ping_status"> 
  60.                 <input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_settings('default_ping_status')); ?> /> 
  61.             <?php _e('Allow link notifications from other Weblogs (pingbacks and trackbacks.)') ?></label> 
  62.             </li> 
  63.             <li> 
  64.                 <label for="default_comment_status"> 
  65.                 <input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_settings('default_comment_status')); ?> /> 
  66.             <?php _e('Allow people to post comments on the article') ?></label> 
  67.             </li> 
  68.         </ul> 
  69. </fieldset>
  70. <fieldset class="options">
  71.         <legend><?php _e('Email me whenever:') ?></legend> 
  72.         <ul> 
  73.             <li> 
  74.                 <label for="comments_notify"> 
  75.                 <input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_settings('comments_notify')); ?> /> 
  76.                 <?php _e('Anyone posts a comment') ?> </label> 
  77.             </li> 
  78.             <li> 
  79.                 <label for="moderation_notify"> 
  80.                 <input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_settings('moderation_notify')); ?> /> 
  81.                 <?php _e('A comment is approved or declined') ?> </label> 
  82.             </li> 
  83.         </ul> 
  84. </fieldset>
  85. <fieldset class="options">
  86.         <legend><?php _e('Before a comment appears:') ?></legend> 
  87.         <ul> 
  88.             <li> 
  89.                 <label for="comment_moderation"> 
  90.                 <input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_settings('comment_moderation')); ?> /> 
  91.                 <?php _e('An administrator must approve the comment (regardless of any matches below)') ?> </label> 
  92.             </li> 
  93.             <li> 
  94.                 <label for="require_name_email"> 
  95.                 <input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_settings('require_name_email')); ?> /> 
  96.                 <?php _e('User must fill out name and email') ?> </label> 
  97.             </li> 
  98.         </ul> 
  99. </fieldset>
  100. <fieldset class="options">
  101.     <legend><?php _e('Comment Moderation') ?></legend>
  102.     <p><?php printf(__('Hold a comment in the queue if it contains more than %s links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" size="3" value="' . get_settings('comment_max_links'). '" />' ) ?></p>
  103.  
  104.     <p><?php _e('When a comment contains any of these words in its content, name, URI,  email, or IP, hold it in the moderation queue: (Separate multiple words with new lines.) <a href="http://wiki.wordpress.org/index.php/SpamWords">Common spam words</a>.') ?></p>
  105.         <p> 
  106.             <textarea name="moderation_keys" cols="60" rows="4" id="moderation_keys" style="width: 98%; font-size: 12px;" class="code"><?php echo get_settings('moderation_keys'); ?></textarea> 
  107.         </p> 
  108. </fieldset>
  109.         <p class="submit"> 
  110.         <input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /> 
  111.         </p> 
  112.     </form> 
  113. </div> 
  114. <?php include("admin-footer.php") ?>
  115.